﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Menu
{
    class Beverage : MenuItem
    {
        public double small { get; private set; }
        public double medium { get; private set; }
        public double large { get; private set; }

        public Beverage(string name, double small, double medium, double large) : base(name)
        {
            if (small <= 0 || medium <= 0 || large <= 0)
            {
                throw new Exception("Price should be greater than 0");
            }
            else
            {
                this.small = small;
                this.medium = medium;
                this.large = large;
            }
        }

        public override void PrintToConsole()
        {
            Console.WriteLine("{0} - Small: ${1}; Medium: ${2}; Large: {3} ", base.name, small, medium, large);
        }
    }
}
